import 'package:flutter_test/flutter_test.dart';
import 'package:kq_flutter_widgets/kq_flutter_widgets.dart';
import 'package:kq_flutter_widgets/kq_flutter_widgets_platform_interface.dart';
import 'package:kq_flutter_widgets/kq_flutter_widgets_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockKqFlutterWidgetsPlatform
    with MockPlatformInterfaceMixin
    implements KqFlutterWidgetsPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final KqFlutterWidgetsPlatform initialPlatform = KqFlutterWidgetsPlatform.instance;

  test('$MethodChannelKqFlutterWidgets is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelKqFlutterWidgets>());
  });

  test('getPlatformVersion', () async {
    KqFlutterWidgets kqFlutterWidgetsPlugin = KqFlutterWidgets();
    MockKqFlutterWidgetsPlatform fakePlatform = MockKqFlutterWidgetsPlatform();
    KqFlutterWidgetsPlatform.instance = fakePlatform;

    expect(await kqFlutterWidgetsPlugin.getPlatformVersion(), '42');
  });
}
